Hands-On Dependency Injection in Go: Produce clean and loosely coupled Go code that is easier to read, maintain, test and extend

Hands-On Dependency Injection in Go: Produce clean and loosely coupled Go code that is easier to read, maintain, test and extend

作者: Corey Scott
出版社: Packt Publishing
出版在: 2018-11-28
ISBN-13: 9781789132762
ISBN-10: 1789132762
裝訂格式: Paperback
總頁數: 346 頁





內容描述


Dependency Injection in Go, often considered to be tedious, made easy with this comprehensive guide
Key Features

Gain an in-depth insight into Dependency Injection and the SOLID principles
Learn how to refactor existing code to adopt Dependency Injection using several of the methods available in Go.
Discover how to design a system from scratch to support Dependency Injection and also Dependency Injection anti-patterns.

Book Description
Go simplifies the process of building steadfast and well-organized software. Leverage Dependency Injection and Testings to produce clean, loosely coupled Go code that is inherently easier to read, maintain, test and extend.
Hands-On Dependency Injection and Testing in Go is an in-depth guide to Dependency Injection and the SOLID principles for Go. It will take you on a journey to refactor existing code to adopt Dependency Injection using several methods available in Go. Each method is explained in detail, focusing on their strengths and weakness and with the help of examples, and you will gain knowledge on how to best leverage the method to transform the code into something simple and flexible. Moving ahead, you will learn how to incorporate the dependency graph to spot and eliminate issues. The book will educate you on the techniques involved in using Dependency Injection with test stubs and mocks to test otherwise difficult or impossible scenarios and achieve thorough unit test coverage.
Finally, we will talk about how to design a system from scratch to support Dependency Injection and also Dependency Injection anti-patterns.
What you will learn

Understand the benefits of Dependency Injection.
Explore several Dependency Injection patterns in Go.
Learn to leverage Dependency Injection to produce high quality, loosely coupled and thoroughly tested Go code.
Gain insight on how to refactor existing Go code to use Dependency Injection.
Learn to design a Go new package or system to use Dependency Injection

Who This Book Is For
Programmers with a few years experience in any language and a basic understanding of Go who wish to produce clean, loosely coupled code.




相關書籍

Node.js 實戰, 2/e (Node.js in Action, 2/e)

作者 [英]亞歷克斯·楊 [美] 布拉德利·馬克 [美]麥克·坎特倫

2018-11-28

iOS App 實做攻略-使用 jQuery Mobile

作者 王鴻儒

2018-11-28

PHP & MySQL 武功祕笈, 2/e (舊名: 全方位學習 PHP & MySQL)

作者 藍易

2018-11-28